1import se.datadosen.jalbum.Msg;
2
3
4	void inactivate(File file) {
5		if (file.exists()) {
6			File inactivated = new File(file.getParentFile(), file.getName()+".inactive");
7			file.renameTo(inactivated);
8		}
9	}
10
11	int answer = JOptionPane.showConfirmDialog(
12	        window,
13	        Msg.get("ui.resetToFactoryDefaultsWarning"),
14	        Msg.get("ui.resetToFactoryDefaults"),
15	        JOptionPane.YES_NO_OPTION,
16	        JOptionPane.WARNING_MESSAGE);
17
18	if (answer != JOptionPane.YES_OPTION) {
19	    return;
20	}
21	File homeDir = new File(System.getProperty("user.home"));
22	inactivate(new File(homeDir, ".jalbum-defaults.jap"));
23	inactivate(new File(homeDir, ".jalbum-ftp-accounts.xml"));
24	inactivate(new File(homeDir, ".jalbum-recent-projects.properties"));
25